package com.stox.charting.ui.swing.model.unit;

public class LineUnit implements Comparable<LineUnit>{

	private double previousValue;
	private double value;
	
	public LineUnit() {
		
	}
	
	public LineUnit(double previousValue, double value) {
		super();
		this.previousValue = previousValue;
		this.value = value;
	}

	@Override
	public int compareTo(LineUnit o) {
		return 0;
	}
	
	public double getPreviousValue() {
		return previousValue;
	}
	public void setPreviousValue(double previousValue) {
		this.previousValue = previousValue;
	}
	public double getValue() {
		return value;
	}
	public void setValue(double value) {
		this.value = value;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(previousValue);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(value);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LineUnit other = (LineUnit) obj;
		if (Double.doubleToLongBits(previousValue) != Double
				.doubleToLongBits(other.previousValue))
			return false;
		if (Double.doubleToLongBits(value) != Double
				.doubleToLongBits(other.value))
			return false;
		return true;
	}
	
}
